package net.thunderklaus.scala_ejb

import javax.ejb._
import javax.annotation.PostConstruct


@Remote
trait CalcBean2 {
	def add2(x: Int): Int
}


@Stateless
class CalcBean2Impl extends CalcBean2 {
	
	@EJB
	private val calcBean: CalcBeanLocal = null
	
	@PostConstruct
	private def init() {
		println("Post construct called for " + this)
	}
	
	override def add2(x: Int) = calcBean.add(x, 2) 
}
